<template>
  <el-main class="main">
    <el-card>
      <el-form class="ExamForm" :inline="true" :model="Form">
        <el-form-item label="名称：">
          <el-input placeholder="名称"></el-input>
        </el-form-item>
        <el-form-item label="时长：">
          <el-input
            v-model="formInline.times"
            placeholder="最小值"
            class="inp2"
          ></el-input>
          -
          <el-input
            v-model="formInline.timess"
            placeholder="最大值"
            class="inp2"
          ></el-input>
          <!-- <InputNumberRange
            :disabled="isDisabled"
            :precision="num"
            v-model="formInline.numberRange"
            style="width: 170px"
          ></InputNumberRange> -->
        </el-form-item>
        <el-form-item label="参加考试的时间：">
          <el-time-picker
            is-range
            v-model="value1"
            range-separator="至"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
            placeholder="选择时间范围"
          >
          </el-time-picker>
        </el-form-item>
        <el-form-item label="总分数：">
          <!-- <InputNumberRange
          :disabled="isDisabled"
          :precision="num"
          v-model="formInline.numberRange"
          style="width: 170px"
        ></InputNumberRange> -->
          <el-input
            v-model="formInline.scores"
            placeholder="最小值"
            class="inp2"
          ></el-input>
          -
          <el-input
            v-model="formInline.scoress"
            placeholder="最大值"
            class="inp2"
          ></el-input>
        </el-form-item>
        <!-- 按钮 -->
        <div class="btn">
          <el-form-item>
            <el-button type="primary" @click="onSearch"
              ><i class="el-icon-search el-icon--left"></i>查询</el-button
            >
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="onRefresh"
              ><i class="el-icon-refresh el-icon--left"></i>刷新</el-button
            >
          </el-form-item>
        </div>
      </el-form>
      <!-- 表格 :header-cell-style="{
        background: '#e2d2d2',
        color: '#000000',
        border: '1px solid tan',
      }"-->
      <el-table :data="tableData" border stripe>
        <el-table-column label="序号" width="50" type="index">
        </el-table-column>
        <el-table-column prop="name" label="名称"> </el-table-column>
        <el-table-column label="总分数" width="150"> </el-table-column>
        <el-table-column label="创建人" width="150"> </el-table-column>
        <el-table-column label="时长" width="150"> </el-table-column>
        <el-table-column label="更新时间"> </el-table-column>
        <el-table-column label="操作" width="255" align="center">
          <el-button size="mini" type="success" @click="Details"
            >详情</el-button
          >
          <!-- <el-button size="mini" type="success" @click="Edit">编辑</el-button>
        <el-button size="mini" type="danger" @click="Delete">删除</el-button> -->
        </el-table-column>
      </el-table>
      <!-- 分页器 -->
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="query.page"
        :page-size="query.pageSize"
        layout=" total, sizes, prev, pager, next, jumper"
        :total="100"
        :page-sizes="[10, 20, 30, 40, 50, 75, 100]"
        style="margin: 0 auto; text-align: center"
      >
      </el-pagination>
      <!-- 编辑弹窗 -->
      <!-- <el-dialog title="编辑" :visible.sync="isShow" width="35%">
      <el-form class="form-content" ref="form" label-width="90px">
        <el-form-item class="dialog-inp" label="序号">
          <el-input></el-input>
        </el-form-item>
        <el-form-item class="dialog-inp" label="名称">
          <el-input></el-input>
        </el-form-item>
        <el-form-item class="dialog-inp" label="总分数">
          <el-input></el-input>
        </el-form-item>
        <el-form-item class="dialog-inp" label="创建人">
          <el-input></el-input>
        </el-form-item>
        <el-form-item class="dialog-inp" label="时长">
          <el-input></el-input>
        </el-form-item>
        <el-form-item class="dialog-inp" label="更新时间">
          <el-input></el-input>
        </el-form-item>
        <el-form-item class="dialog-btn">
          <el-button type="primary" @click="modification">修改</el-button>
          <el-button type="warning" @click="isShow = false">取消</el-button>
        </el-form-item>
      </el-form>
    </el-dialog> -->
    </el-card>
  </el-main>
</template>

<script>
// import InputNumberRange from '@/views/student/Smy/NumberRange'
export default {
  name: 'MyExam',
  // components: {
  //   InputNumberRange
  // },
  data () {
    return {
      Form: {},
      value1: [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)],
      query: {
        page: 1,
        pageSize: 10
      },
      tableData: [
        {
          name: 'zs'
        }
      ],
      isShow: false, // 编辑：控制隐藏
      // isDisabled: false, // 是否禁用
      // num: 0, // 精度
      formInline: {
        times: '',
        timess: '',
        scores: '',
        scoress: ''
      }
    }
  },
  methods: {
    // 详情
    Details () {
      this.$router.push('/sxq/MyRadio/1')
    },
    // 刷新
    onRefresh () {},
    // 查询
    onSearch () {},
    // 修改
    modification () {},
    // 页数
    handleCurrentChange () {},
    // 条数
    handleSizeChange () {}
    // 编辑按钮
    // Edit() {
    //   this.isShow = true
    // },
    // // 删除
    // Delete() {},
    // 新建
    // onEstablish() {},
  }
}
</script>

<style lang="scss" scoped>
.main {
  width: 80%;
  box-sizing: border-box;
  margin: 20px auto;
}
.inp2 {
  width: 80px;
}
.ExamForm {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
</style>
